#!/bin/sh

if [ -z $HASTHI_HOME ]; then
	HASTHI_HOME=`pwd`
fi

if [ -z $LOG_DIR ]; then
	LOG_DIR=`pwd`
fi

cd $HASTHI_HOME
for i in $HASTHI_HOME/lib/*.jar
do
  CLASSPATH=$CLASSPATH:$i
done

CLASSPATH=$HASTHI_HOME/classes:$CLASSPATH
HASTHI_ADDON_HOME=$HASTHI_HOME/../management-addon/build/
if [ -e $HASTHI_ADDON_HOME ];then
	CLASSPATH=$CLASSPATH:$HASTHI_ADDON_HOME/lib/hyperic-sigar-1.5.0.1/sigar-bin/lib/sigar.jar
fi	


#if [ ${#} -eq 4 ];then 
#	$JAVA_HOME/bin/java -Xmx1024m -classpath  $CLASSPATH  -Dhasthi.logDir=$4 hasthi.tools.ManagerSimulatorSet $1 $2
#else
#	$JAVA_HOME/bin/java -Xmx1024m -classpath  $CLASSPATH  hasthi.tools.ManagerSimulatorSet $1 $2
#fi

$JAVA_HOME/bin/java -Xmx1024m -classpath  $CLASSPATH  -Dhasthi.logDir=$LOG_DIR hasthi.tools.ManagerSimulatorSet $*
